//
// Created by hps on 24-4-6.
//

#ifndef MARKDOWNWINDOW_H
#define MARKDOWNWINDOW_H

#include "EditorBase.h"
#include "MarkDonwCodeHighLight.h"
#include "../src/utils/MarkDownParser.h"

namespace hps {



class MarkdownWindow : public EditorBase {
    Q_OBJECT
public:
    MarkdownWindow();
    MarkdownWindow(std::string& path);
    void init();
    void setUi();

    void showPreview();
    void hidePreview();
    void showTextEdit();
    void hideTextEdit();
    void showPreviewAndTextEdit();
public slots:
    void previewChange();
private:
    MarkdownHighlight* m_highlight;

    // 预览
    QTextEdit* m_previewEditor;
};

} // hps

#endif //MARKDOWNWINDOW_H
